//
//  DGAccount+PP.m
//  pickpic
//
//  Created by Jinxiao on 9/10/16.
//  Copyright © 2016 MicroDream. All rights reserved.
//

#import "DGAccount+PP.h"

@implementation DGAccount (PP)

- (PPAccountProfiles *)profiles {
    PPAccountProfiles *profiles = objc_getAssociatedObject(self, "profiles");

    if(profiles == nil) {
        profiles = [PPAccountProfiles existingProfilesForUserID:self.userID];
        objc_setAssociatedObject(self, "profiles", profiles, OBJC_ASSOCIATION_RETAIN);
    }

    return profiles;
}

- (BOOL)pickpicAccount {
    return ![self.username hasPrefix:@"三方"];
}

@end
